/**
 * 这个表会有很多很多数据，要节约空间
 */
module.exports = (db, DataTypes) => {
  return db.define('InspectionRecord', {
    state: DataTypes.INTEGER,
  }, {
    timestamps: false,
    associate(models) {
      models.InspectionRecord.belongsTo(models.EquipmentAttribute, { foreignKey: 'EquipmentAttributeId' });
      models.InspectionRecord.belongsTo(models.InspectionFile, { foreignKey: 'InspectionFileOid', targetKey: 'oid' });
    }
  });
};
